package feng.demo.entity;

import java.util.Date;

public class Cart {
    private Integer cartid;
    private User user;
    private Commodity commodity;
    private Integer num;
    private Double price;
    private Date tcreate;

    public Cart() {
        this.user=new User();
        this.commodity=new Commodity();
        this.tcreate =new Date();
    }

    public Integer getCartid() {
        return cartid;
    }

    public void setCartid(Integer cartid) {
        this.cartid = cartid;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getTcreate() {
        return tcreate;
    }

    public void setTcreatee(Date tcreate) {
        this.tcreate = tcreate;
    }

    @Override
    public String toString() {
        return "Cart{" +
                "cartid=" + cartid +
                ", user=" + user +
                ", commodity=" + commodity +
                ", num=" + num +
                ", price=" + price +
                ", tcreate=" + tcreate +
                '}';
    }
}
